﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Draco.Studio.Core.Configuration;

namespace Draco.Studio.Core
{
    public class ServiceMatrix : AbstractServiceMatrix
    {
        private IServiceHost m_host;
        private IServiceContext m_ctx;
        public ServiceMatrix(IServiceHost host)
            : this(host,null)
        { 
        }

        public ServiceMatrix(IServiceHost host,IMatrixConfiguration configuration)
        {
            m_host = host;
            if (configuration != null)
            {

            }
            m_ctx = InitServiceContext();
        }

        public void RegisterHost()
        {
            m_host.RegisterHostServices(m_ctx);
            m_ctx.RegisterService("STUDIO.HOST", m_host);

            LoadBundles(m_ctx);
        }

        protected override IServiceContext InitServiceContext()
        {
            return new ServiceContext();
        }

        protected override void LoadBundles(IServiceContext ctx)
        {
 
        }

        public override void Dispose()
        {
            
        }
    }
}
